<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script>
function fn(data) {
	var oUl1 = document.getElementById('ul1');
	var html = '';
	for (var i=0; i<data.length; i++) {
		html += '<li>'+data[i]+'</li>';
	}
	oUl1.innerHTML = html;
}
</script>
<script>
window.onload = function() {
	
	var oBtn1 = document.getElementById('btn1');
	
	oBtn1.onclick = function() {
		
		var oScript = document.createElement('script');
		oScript.src = 'getData.php';
		document.body.appendChild(oScript);
		
	}
	
}
</script>
</head>

<body>
	<input type="button" id="btn1" value="按钮" />
    <ul id="ul1"></ul>
</body>
</html>
